#pragma once

#include "RedBlackTree.h"

namespace YX
{
	template<class K>
	class set
	{
		typedef struct RedBlackTreeNode<K> Node;

		struct SetKeyOfType
		{
			const K& operator()(const K& key)
			{
				return key;
			}
 		};

	private:
		RedBlackTree<K,K,SetKeyOfType> _tree;

	public:

		typedef typename RedBlackTree<K, K, SetKeyOfType>::iterator iterator;

		pair<iterator, bool> Insert(const K& key)
		{
			return _tree.Insert(key);
		}

		iterator begin() const
		{
			return _tree.begin();
		}

		iterator end() const
		{
			return _tree.end();
		}

	};
}